#!/bin/bash
export TZ="UTC"
host=`uname -a`
echo $host

# example for use extra_flags: PBC_RUNNER=xxx bash run_114.sh "--cache --lazy-transform-pbc"
# you should use "", cannot do like: bash run_114.sh --cache --lazy-transform-pbc
extra_flags=$1

# 定义文件路径
proxy_file=$(realpath ~/.proxy.sh)
chromium_path=$(realpath $(dirname ${BASH_SOURCE[0]}))/../../
depot_tools_path=$workspace/depot_tools
gclient_path=$chromium_path/src/v8/third_party/ninja/

set -e
v8_path=$(realpath $(dirname ${BASH_SOURCE[0]}))
bash $v8_path/CI/build_dcheck_d8.sh

if [[ "${PBC_RUNNER}" == "" ]]; then
    echo "Please set 114 d8 to run this test."
    exit 0
fi
export ASAN_OPTIONS=detect_container_overflow=0 #关闭asan容器溢出检测,防止误报

echo "------------- hermes test -----------------"
bash CI/run-hermes.sh true "$extra_flags"

echo "-------------- test 262 ------------------"
bash CI/run-test262.sh true "$extra_flags"